package com.yami.shop.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yami.shop.bean.model.Friend;
import com.yami.shop.bean.vo.MyFriendVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface FriendMapper extends BaseMapper<Friend> {

    /**
     * 我的好友列表
     *
     * @param userId
     * @return
     */
    List<MyFriendVo> firendList(@Param("userId") String userId, @Param("userName")String userName);

    /**
     * 新增关注列表
     * @param userId
     * @return
     */
    List<MyFriendVo>newConcernsList( @Param("userId")String userId);

    Map<String, Object> selectFansFollowNum( @Param("usId")String usId);

    int getRelation(@Param("usId")String usId, @Param("current")String current);


    IPage<MyFriendVo> fansPage(Page page,@Param("infoId")String infoId, @Param("current")String current);
    IPage<MyFriendVo> followPage(Page page, @Param("infoId")String infoId, @Param("current")String current);
    IPage<MyFriendVo> fansPageSearch(Page page,@Param("current")String currentId,@Param("userName")String userName);

    IPage<MyFriendVo> myFriendListPage(Page page,@Param("infoId")String infoId, @Param("current")String currentId,@Param("userName")String userName);
    Integer myFriendListPageCount(@Param("current")String currentId);
    List<MyFriendVo> followPageNoPage(@Param("current")String currentId );

    IPage<MyFriendVo> searchUserListPage(Page page,  @Param("current") String current, @Param("userName")String userName);
    IPage<MyFriendVo> recommendList(Page page,@Param("userName") String userName ,@Param("current")String current);

    void removeAllFirend(@Param("userId")String userId);

    List<MyFriendVo> getRelations(@Param("userIds") List<String> userIds,@Param("current") String current);
}
